{% extends "base.html" %}

{% load i18n %}
{% load core_tags %}
{% load gravatar %}

{% block profile-bar-admin %}active{% endblock %}

{# This is included here instead of subclassing base_profile because we don't control all the views, and can't set the `profile` variable reliably #}
{% block subnav-bar %}
<!-- BEGIN project bar -->
<div id="project_bar">
  <div class="wrapper">

    <div class="project-title">
      <h2>
        <a href="{{ user.profile.get_absolute_url }}">
        {% gravatar user.email 30 %}
        </a>
        {{ user }}
        {% if user.get_full_name %}
          ({{ user.get_full_name}})
        {% endif %}
      </h2>
    </div>

    <div class="options">

      <ul>
        <li class="{% block profile-bar-profile %}{% endblock %}"><a href="{{ user.profile.get_absolute_url }}">{% trans "Profile" %}</a></li>
        <li class="active"><a href="{% url "profiles_profile_edit" %}"><i class="gear"></i>{% trans "Admin" %}</a></li>

      </ul>
    </div>

  </div>
</div>
<!-- END project bar -->

{% endblock %}

{% block content %}
<div id="project_edit" class="module">
  <div class="wrapper">
    <div class="navigable">
      <ul>
        {% block profile-admin-nav %}
          <li class="{% block profile-admin-details %}{% endblock %}"><a href="{% url 'profiles_profile_edit' %}">{% trans "Details" %}</a></li>
          <li class="{% block profile-admin-social-accounts %}{% endblock %}"><a href="{% url 'socialaccount_connections' %}">{% trans "Connected Services" %}</a></li>
          <li class="{% block profile-admin-change-password %}{% endblock %}"><a href="{% url 'account_change_password' %}">{% trans "Change Password" %}</a></li>
          <li class="{% block profile-admin-change-email %}{% endblock %}"><a href="{% url 'account_email' %}">{% trans "Change Email" %}</a></li>
          <li class="{% block profile-admin-security-log %}{% endblock %}"><a href="{% url 'profiles_security_log' %}">{% trans "Security Log" %}</a></li>
          <li class="{% block profile-admin-tokens %}{% endblock %}"><a href="{% url 'profiles_tokens' %}">{% trans "API Tokens" %}</a></li>
          <li class="{% block profile-admin-delete-account %}{% endblock %}"><a href="{% url 'delete_account' %}">{% trans "Delete Account" %}</a></li>
          <li class="{% block profile-admin-gold-edit %}{% endblock %}"><a href="{% url 'gold_detail' %}">{% trans "Gold Membership" %}</a></li>
          {% if USE_PROMOS %}
            <li class="{% block profile-admin-advertising %}{% endblock %}"><a href="{% url 'account_advertising' %}">{% trans "Advertising" %}</a></li>
          {% endif %}
        {% endblock %}
      </ul>
      <div>
        <h2>{% block edit_content_header %}{% endblock %}</h2>
        {% block edit_content %}
        {% endblock %}
      </div>
    </div>
  </div>
</div>
{% endblock %}
